package com.hcc.repository.starter.autoconfigure;

import com.hcc.repository.core.interceptor.HandlerInterceptor;

import java.util.ArrayList;
import java.util.List;

/**
 * 注入拦截器的bean
 *
 * @author hushengjun
 * @date 2023/4/5
 */
public class RepositoryInterceptor {

    private final List<HandlerInterceptor> handlerInterceptors;

    public RepositoryInterceptor() {
        handlerInterceptors = new ArrayList<>();
    }

    public void addInterceptor(HandlerInterceptor handlerInterceptor) {
        handlerInterceptors.add(handlerInterceptor);
    }

    public List<HandlerInterceptor> getInterceptors() {
        return handlerInterceptors;
    }
}
